home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Systemmonitors / RSys / RSysSrc.lha / RSysGlobal.c < prev    next >
C/C++ Source or Header  |  1993-09-25  |  8KB  |  175 lines

  1. /*
  2. ***************************************************************************
  3. *
  4. * Datei:
  5. *      RSysGlobal.c
  6. *
  7. * Inhalt:
  8. *
  9. *      --- Globale Routinen ---
  10. *
  11. *
  12. *      --- Lokale  Routinen ---
  13. *
  14. *
  15. * Bemerkungen:
  16. *      Globale Daten für RSys (Flags, Menus etc.)
  17. *
  18. * Erstellungsdatum:
  19. *      07-Jul-93     Rolf Böhme
  20. *
  21. * Änderungen:
  22. *      07-Jul-93     Rolf Böhme      Erstellung
  23. *
  24. ***************************************************************************
  25. */
  26.  
  27. #include "RSys.h"
  28.  
  29. struct Library *DiskfontBase                = NULL;
  30. struct Library *AslBase                     = NULL;
  31. struct Library *GadToolsBase                = NULL;
  32. struct Library *UtilityBase                = NULL;
  33. struct Library *CxBase                        = NULL;
  34. struct Library *IFFParseBase                = NULL;
  35. struct Library *IconBase                    = NULL;
  36.  
  37. struct WorkbenchBase *WorkbenchBase     = NULL;
  38. struct IntuitionBase *IntuitionBase     = NULL;
  39. struct GfxBase *GfxBase                     = NULL;
  40. struct ExpansionBase *ExpansionBase     = NULL;
  41. struct AmigaGuideBase *AmigaGuideBase    = NULL;
  42.  
  43. struct ExecBase *SysBase;
  44. struct DosLibrary *DOSBase;
  45.  
  46. UBYTE namebuffer[MAXPUBSCREENNAME + 1] = (UBYTE *) "Workbench",
  47.         autocon[MAXFULLNAME];
  48.  
  49. char _fullpath[MAXFULLNAME];
  50.  
  51. struct List ListeLVList;
  52.  
  53. struct Screen *Scr = NULL;
  54. APTR    VisualInfo = NULL;
  55. struct Window *SysWnd = NULL;
  56. struct Gadget *SysGList = NULL;
  57. struct Menu *SysMenus = NULL;
  58. UWORD SysZoom[4];
  59. struct Gadget *SysGadgets[20];
  60. UWORD SysLeft = 153;
  61. UWORD SysTop = 30;
  62. UWORD SysWidth = 487;
  63. UWORD SysHeight = 183; /*173*/
  64. UBYTE *SysWdt = (UBYTE *) NAME " " VERSION " (" DATE ", " TIME ")";
  65. struct TextAttr *Font;
  66. UWORD FontX,
  67.         FontY;
  68. UWORD OffX,
  69.         OffY;
  70. struct TextAttr TAttr;
  71. struct TextAttr Topaz80 =
  72. {
  73.     (STRPTR) "topaz.font", TOPAZ_EIGHTY, FS_NORMAL, FPF_ROMFONT
  74. };
  75.  
  76. struct MsgPort *SysIdPort;
  77.  
  78. ScrollEntry *Entries = NULL;
  79.  
  80. EntryAttribute EntryAttr[]=
  81. {
  82.     /* 00 */ {"Task",                          "Address  Taskname            Typ  Pri Stack Stat Cli",  "%08lx %-18.18s %4.4s %4ld %5ld %4.4s %3.3s",        MakeTaskList,                1     },
  83.     /* 01 */ {"Library",                      "Address  Libraryname               Version  OpenCnt O",  "%08lx %-24s %4ld.%-4ld %7ld %lc",                     MakeLibList,                1     },
  84.     /* 02 */ {"Memory",                         "Memory address     Size    Type",                  "%08lx     %10ld %s",                                MakeMemoryList,            0     },
  85.     /* 03 */ {"Port",                          "Address  Portname               Signal-Task      Pri",  "%08lx %-22s %-15s %4ld",                                 MakePortList,                1     },
  86.     /* 04 */ {"Volume",                         "Volumename   K-Free K-Used %Used F Sta Typ",     "%-12.12s %6ld %6ld %4ld%% %lc %3.3s %4.4s",MakeVolumeList,            1     },
  87.     /* 05 */ {"Assign",                         "Assign        Directory",                             "%-13.13s %-39.39s",                                MakeAssignList,            1     },
  88.     /* 06 */ {"Font",                          "Address  Fontname             Typ    Y   X Low Upp",     "%08lx %-20s %-4s %3ld %3ld %3ld %3ld",                MakeFontList,                1     },
  89.     /* 07 */ {"Resource",                     "Address  Resourcename                Version  OpenCnt",  "%08lx %-26.26s %4ld.%-4ld %6ld",                        MakeResList,                1     },
  90.     /* 08 */ {"Interrupt",                     "Address  Interruptname         Pri   Data     Code",     "%08lx %-20.20s %4ld %08lx %08lx",                     MakeIntrList,                1     },
  91.     /* 09 */ {"Window",                         "Address  Windowtitle         H   W   X   Y Screen",      "%08lx %-17.17s %3ld %3ld %3ld %3ld %-10.10s",     MakeWindowList,            1     },
  92.     /* 10 */ {"Screen",                         "Address  Screentitle               H   W   X   Y Typ",  "%08lx %-23.23s %3ld %3ld %3ld %3ld %3.3s",         MakeScreenList,            1     },
  93.     /* 11 */ {"Input Handler",              "Address  Inputhandler name     Pri   Data     Code",     "%08lx %-20.20s %4ld %08lx %08lx",                     MakeHandlerList,            1     },
  94.     /* 12 */ {"System Infos",                 "                      Systeminfo",                      NULL,                                                    MakeSystemList,            0     },
  95.     /* 13 */ {"Hardware Infos",             "                  Hardware/Expansion",                 NULL,                                                    MakeHardwareList,         0     },
  96.     /* 14 */ {"Online Help",                 "                     Online Help",                     NULL,                                                    NULL,                         0     },
  97.     /* 15 */ {"Preferences",                 "                     Preferences",                     NULL,                                                    SysPrefList,                0     },
  98.     /* 16 */ {"Devices/Handler",             "Device name   Driver/Handler",                      "%-13.13s %-28.28s",                                SysResidentList,            1     },
  99.     /* 17 */ {"Diskfonts",                     "Font name            Type   Y Style",             "%-20.20s %-4.4s %3ld %10.10s",                 SysAvailFontsList,        1     },
  100.     /* 18 */ {"ENV:-List",                      "ENV-Variable  Content",                               "%-13.13s %-28.28s",                                 SysEnvList,                 1   },
  101.     /* 19 */ {"CLI-List",                     "Address  CLI nr. Name             Pri  Stack",             "%08lx CLI %-3ld %-15.15s %4ld %6ld",                 SysCLIList,                 1     },
  102.     /* 20 */ {"Resident Program",         "Address  Resident name    UseCount  Type",                    "%08lx %-20.20s %4ld %-14.14s",                          SysResidentProg,          1    },
  103.     /* 21 */ {"Semaphore",                     "Address  Semaphore name          Pri Ownertask",          "%08lx %-22.22s %4ld %-12.12s",                         SysSemaphoreList,         1     },
  104.     /* 22 */ {"System vector",              "                   System Vectors",                     NULL,                                                    SysVectorList,             0     },
  105.     /* 23 */ {"Software Device",             "Address  Devicename                  Version  OpenCnt",  "%08lx %-26.26s %4ld.%-4ld %6ld",                        SysSoftDeviceList,        1     },
  106.     /* 24 */ {"Public Screen",              "Address  Name              VCnt SigTask",                  "%08lx %-18.18s %3ld %-9.9s",                    SysPubScreenList,         1     },
  107.     /* 25 */ {"Blitter Waiter",             "Address  Name                 Prio",                          "%08lx %-20.20s %3ld",                                     SysBlitterWaitList,        1     },
  108.     /* 26 */ {"TOF Waiter",                  "Address  Name                 Prio",                          "%08lx %-20.20s %3ld",                                     SysTOFWaitList,            1     },
  109.     /* 27 */ {"Commodity",                     "Address  Name                 Prio",                             "%08lx %-20.20s %3ld",                                     SysBrokerList,             1     },
  110.     /* 28 */ {"Printer data",                 "                    Printer data",                              NULL,                                                    SysExtPrinterData,        0     },
  111.     /* 29 */ {"Library offsets",             "Offs Address  Act Function",                            "%4ld %08lx %3s %-22.22s" ,                        SysCheckOffs,           0   },
  112.     /* 30 */ {"Available Display Modes", "Address  Name              Depth   MinR      MaxR",      "%08lx %-17.17s  %3ld  %4ld,%-4ld %4ld,%-4ld",     RSysGetDisplayModes,     1     },
  113.     /* 31 */ {"Volume locks",                 "Address  File                                Access ",  "%08lx %-35.35s  %-5s",                                    RSysLockList,                1     },
  114.     /* 32 */ {"Amigaguide XRef",             "Address  XRef keyword   Type File           Line",         "%08lx %-14.14s %4.4s %-15.15s %4ld",                 RSysAmigaGuideRefList,    1     },
  115.     /* 33 */ {"Gadgets",                      "Address  Gadget text    Typ    PosX PosY    W    H",     "%08lx %-14.14s %6.6s %4ld %4ld %4ld %4ld",         RSysGadgetList,            0     },
  116.     /* 34 */ {"Memory areas",                  "Startadr Endadr   Attributes  Comment",                  "%08lx %08lx %3.3s %3.3s %3.3s %-22.22s",         RSysMemoryAreaList,            1     },
  117.     /* 35 */ {"Fault codes",                  "Fault  Message",                                        "%3ld   %-50.50s",                                 RSysFaultMessages,            1     },
  118. };
  119.  
  120. struct _flags Flags =
  121. {
  122.     1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1,
  123.  
  124. /* RSys private */
  125.     1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  126.  
  127. /* Dummys */
  128.    0, 0, 0, 0, 0
  129. };
  130.  
  131. int    countentries;
  132. int    topentry;
  133.  
  134. int    LastID = SYSTEMINFO;
  135.  
  136. int ReopenWindow = FALSE;
  137.  
  138. int bpc = 0, bgc = 0;
  139. long bpp = 0x00000000L;
  140. int winddetail = 0,windblock = 1,menudetail = 0;
  141. int iconx = NO_ICON_POSITION, icony = NO_ICON_POSITION;
  142. int listviewheight = 10;
  143. char *RSysName = NULL;
  144.  
  145. const char *field[] = {
  146.     "-",
  147.     "<no id>",
  148.     "<no flags>",
  149.     "<no task>",
  150.     "<no node>",
  151.     "<wrong type: %ld>",
  152.     "<??>",
  153.     "<no title>",
  154.     "<no baudrate>",
  155.     "<no parity>",
  156.     "<no handshk>",
  157.     "<no handler>",
  158.     "<no file>",
  159.     "<no lock>",
  160.     " ",
  161.    "<no FD-Offsets>",
  162.    "<has image>",
  163.    "<unknown>"
  164. };
  165.  
  166. RSYSFILES RSysFiles =
  167. {
  168.    (UBYTE *)"PROGDIR:" NAME "Hardware.DAT",
  169.    (UBYTE *)"PROGDIR:" NAME "LibOff.DAT",
  170.    (UBYTE *)"PROGDIR:" NAME "13.guide",
  171.    (UBYTE *)"PROGDIR:" NAME "13.guide.context",
  172.    (UBYTE *)"PROGDIR:" NAME "Action.dat"
  173. };
  174.  
  175.